package com.salesmanager.test.utils;



import java.util.List;

import com.salesmanager.test.core.AbstractSalesManagerCoreTestCase;
import org.junit.Assert;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import com.salesmanager.core.modules.utils.Encryption;
import com.salesmanager.core.utils.CacheUtils;

public class UtilsTestCase extends AbstractSalesManagerCoreTestCase {
	
	
	@Autowired
	private Encryption encryption;
	
	@Autowired
	private CacheUtils cache;
	


	
	@Test
	public void testCache() throws Exception {
		

		
		//@SuppressWarnings("rawtypes")
		//List countries = countryService.list();




		//CacheUtils cache = CacheUtils.getInstance();
		//cache.putInCache(countries, "COUNTRIES");
		
		@SuppressWarnings("rawtypes")
		List objects = (List) cache.getFromCache("COUNTRIES");
		
		Assert.assertNotNull(objects);
		
	}
	

	
	@Test
	public void testGeoLocation() throws Exception {
		
//		Address address = geoLoaction.getAddress("96.21.132.0");
//		if(address!=null) {
//			System.out.println(address.getCountry());
//		}
		
	}
	

}
